# $Id: PKGBUILD 181995 2013-04-05 08:57:11Z svenstaro $
# Maintainer: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Pierre Schmitz <pierre@archlinux.de>

pkgbase=kdetoys
pkgname=('kdetoys-amor'
         'kdetoys-kteatime'
         'kdetoys-ktux')
pkgver=4.10.2
pkgrel=1
arch=('i686' 'x86_64')
url='http://www.kde.org'
license=('GPL' 'LGPL' 'FDL')
groups=('kde' 'kdetoys')
makedepends=('cmake' 'automoc4' 'kdebase-workspace')
source=("http://download.kde.org/stable/${pkgver}/src/${pkgbase}-${pkgver}.tar.xz")
sha1sums=('3fa4fc9b9ec04e9967b9a326d9dc26c3055b5e2b')

build() {
	cd $srcdir
	mkdir build
	cd build
	cmake ../${pkgbase}-${pkgver} \
		-DCMAKE_BUILD_TYPE=Release \
		-DKDE4_BUILD_TESTS=OFF \
		-DCMAKE_SKIP_RPATH=ON \
		-DCMAKE_INSTALL_PREFIX=/usr
	make
}

package_kdetoys-amor() {
	pkgdesc='On-Screen Creature'
	depends=('kdebase-runtime')
	install='kdetoys.install'
	cd $srcdir/build/amor
	make DESTDIR=$pkgdir install
}

package_kdetoys-kteatime() {
	pkgdesc='Tea Cooker'
	depends=('kdebase-runtime')
	install='kdetoys.install'
	cd $srcdir/build/kteatime
	make DESTDIR=$pkgdir install
}

package_kdetoys-ktux() {
	pkgdesc='KTux'
	depends=('kdebase-workspace' )
	install='kdetoys.install'
	cd $srcdir/build/ktux
	make DESTDIR=$pkgdir install
}
